import wave
import ossaudiodev
import threading
import record	
import time

def teste(nome):
	devGrav='/dev/dsp'
	devPlay='/dev/dsp1'
	rec = record.Record(devGrav)
	play = record.Record(devPlay)
	rec.gravar()
	play.tocarWave('TESTE.wav')
	rec.parar()
	rec.save2wave(nome)

for i in range(1,5):
	nome = 'micPC-onBoard-0%s.wav' % i
	teste(nome)
	time.sleep(0.3)
	
